﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataType;

namespace LocalView
{
    
    interface ILocalView
    {
        event EventHandler<Credentials> Login;
        event EventHandler Logout;
        //public event EventHandler<> GetFolderStructure;
        //public event EventHandler<string> AddFile;
        //public event EventHandler<string> GetFile;
        //public event EventHandler<string> UpdateFile;
    }
}

/*
LVW - list of operation required
Login(); //platform-independent
GetFolderStructure();//platform-independent
AddFile();//platform-independent
GetFile();//platform-independent
UpdateFileOnSave();//platform-independent
//GDoc supports it
GetListOfSharedUsers(); //platform-specific
ShareDocument();//platform-specific


UI presentation - all info in panel's view:
Panel "Folder View" - display folder's list
Panel "Credentials" - display credentials
Panel "Shared Users" - display the list of users the document shared with
Panel "Shared Documents" - allows to shared document with user
//////////////////////////////////////////////////////////////////////////////

LVE

UI presentation - submenu instead of panel's view:
submenu - "GetDocument..."
submenu - "OpenDocument..." : Locally, Remotely
submenu - "SharedUsers..." - list of users
submenu - "Share Document..."

1. Base component is LocalView
    It contains the instance of sync_manager (COE). Asks sync_manager about required operations. 
    sync_manager calls remote_connector and returns result to the LV.
    sync_manager has instance of LV and RC in order to communicate with it.
2. COE is base component. 
    The app start creates LV, RC, COE(LV, RC). App hosts three these components during life-cycle of application. Nothing more.
    During creation of LV, RC, COE the communication is being set up as well. So after creation all components communicate with each other via COE
    without any outside interaction. The communication is based only events.
*/